<?php 
$fs = $f->getChildren();
?>


  
  <ul> 
  <?php foreach($fs as $ff): ?>
  <li>
  <?php if($ff->hasChildren()):?>
  <span class="folder">
  <?php echo $ff ?>
  <?php else: ?>
  <span class="file">
  <?php echo link_to($ff,'material_collection', array('action' => 'filter'), array('query_string' => 'filter_folder='.$ff->getId(), 'method' => 'post','style'=>"padding-left: 0")) ?>
  <?php endif ?>
  
  <?php if($tools):?>
  <?php include_partial('folder_tools/static_tools',array('f'=>$ff));?>
  <?php endif ?>
  
  </span>
					
					<?php if($ff->hasChildren()):?>
					  <?php //include_partial('folder_tools/jqitem',array('f'=>$ff,'tools'=>$tools)) ;?>
					<?php endif ?>
  </li>
  <?php endforeach ?>
  </ul>					
